Lumps may occur if the cream cheese is not at the right consistency while beating or if the ingredients are not mixed thoroughly. Recipes call the cream cheese to be at room temperature just for this reason so that it is easier to beat it. However in this recipe, if the cream cheese is too soft the resulting frosting will not be stable and hence I recommend you to microwave it for a few seconds and then beat the cream cheese and sugar first to ensure that it is smooth before adding any other ingredient.