fixed error in qlearning