fixed a bizarre bug!