Update Issue 170

Fix + non regression test
Update Issue 194

Fix + non regression test

(cherry picked from commit 74661503fa6882790092b945b5e6acd44089386a)