Fixed castling into check bug