some bug fixes for bandit algorithms