fix issue 2788

Hi, this is a new pull request=)