fixed bugs in main page