fixed bugs with main page