Some fixes

Some fixes.

Also fixes the issue https://github.com/Doptor/Doptor/issues/64