fix type formatting error when building return value