Castling update - no longer crashes