fixed resource flying away bug