Self is not defined fix