fixed dismiss error and have form submit work on pressing enter