Fix function return value used in write context.