changed button to work in all cases and working on popup