history: fixed return value handling