Use idle callback and make sure it is not called twice