1.10.2 fixes

Multiple fixes for version 1.10.2.
Continuation of #395

See commits messages.