additional fixes for #515
Merge remote-tracking branch 'origin/master'