Fix castling problems