Auto-correct casting
Added check to ensure we are fixing this error