fixing concat in the case when gradInput is not emmitted