fix bugs according to: http://code.google.com/p/gmchess/issues/detail?id=32