fixed a very sneaky bug