Castling bugs fixed.