fix wrong return order