improve usability; fix js error on close button