Changed the way buttons appear and disappear.