fixed logical mistake #59