fix hstack bug