Fixes from PR#1