fixed castling bug(s)