fix issue 789