didn't do that right, for various reasons
fixed close button bug