Fixes AttributeError in #2