Minor bug in Main class