fixed bug where self.path wasn't defined