Solves issue #166

This pull requests fixes issue #166