Fixed SMP issues