Small fixes to issue #5