Fixed some bugs

added self. call before function call, added : at end of if statement