Fix bugs caused by remove of return.