fix the function of rantime error