fixed some code: such as range part of overload_fun contracts