fix for type error