Fixing last bugs in code and config