Fix settings corruption
Init mutex