Corrected Object to Class coercion error