Fixes an AttributeError