Fixed problems caused by async rendering