Fixes #72
(cherry picked from commit 0592b52)