made it so that buttons are erased before being drawn