Fixes the wrong usage of B dimensions on kernel.