fixes a but in setHeading()

thanks, Brian!