fixed a bug where self. was not used