Detect CheapCast
Bug fixes