Fix for correct output dimensions