fix end missing in initParams.m