bug fix.
change popup to background.
refactoring.