Fix popup is broken on Safari5