Issue with form not closing in chrome