Fix issue with undefined close button position