Fixes reference to self in function definition.