solved bug introduced in PR #167

This is the simplest solution that I have time to come up with