Fixed issue #8857: Fixed issue of type casting and return number value

Fixed issue of type casting and return number value