fix random bug