fix different types of return value