Clicking submit button freezes on Please wait... text