fixing bug #799
Merge pull request #837 from ultraklon/modification2

fixing bug #799