Castling bug fixed!