fixes #def bug