fixed some bugs. turned popup buttons into actual popup buttons