Fix/fixes from822

these are the fixes discussed in #822