Fixed UI bugs

Button wasn't hiding, and math/3D modes weren't switching properly on select