fixed bugs and missing submit buttons