Update popup.js

realized that somethings were wrong, should be fixed.