Lock function about phases