error in createAction with missing variable fixed