fixed genMove problem