fixed issues with opening/closing new/edit appening