fixes issue #28
(cherry picked from commit 499b9d792228f53c7363735d0184072aedd622f7)