<Comment deleted by user>
Hello,
Black has no rook on h8 in this position, so black cannot castle kingside.
It's not a bug; it's because you put a bishop on h8.
If you enter the correct starting position "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR", it will add O-O castling rights for black