Fix for bug #34

This pull request fixes bug #34