Added lock on idle