Some small fix in type error