Submit won't work under certain conditions