Trying out mahinders solution to issue 62
(from master branch)