No bug, since the bishop wasn't looking at the square where the king would land (c8) or at the square he would pass (d8). It's ok for the rook to be in attack or pass from squares that are attacked. I hope that helps.
wrong castling
If you need help, please contact our Help and Support team.

hi i played a game in live chess and my opponent castled when my bishop was looking to his square between king and rook on move 19