fix button box so close button works properly