fix for #814 and more discovered during testing