Fixed a bug in compose_result