Fixes for issues reported by Jas