Fixed minor castling problem