fixes color resetting on button clicks