repair the return value exactly (fixes #3492)

repair the return value exactly (fixes #3492)