fixing #796