avoid sleep NPE