solve the problem of twinkling when init