fix main page, fix compile errors