Fixed bug in client sometimes causing main screen not to be loaded properly