Disable popup buttons when needed