Another castling bugfix