Class type error fixed