fixes to issue161