Fixed 500 ReferenceError: path is not defined