fixed some functionality on the pop-up