Why is my form getting stuck and never submits?