Bugfix on castling validation