type error fixed