fix create kernel weights bug