corrected casting