fix a bug in printing moves