Changed return value from object created to self to prevent loop exit