Workaround for issue #100
Some minor changes