fixed a bug in the sarsa implementation