A note on graphs with exactly two main eigenvalues