fix the type casting issue caused by required check