Fix cpu locking