Manual update to 0.3.9 from upstream

Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>