fixing bug where popup was not vertically centered