fixes #42
improve #34