changed popup class to work properly