tentative fix for memory corruption bug in convolution code