Doesnt the alternative program have enoigh carbs that you would be out of ketosis? That would account for a gain. If you are trying to lose fat and gain muscle try getting a smart scale so you can see the breakdown of fat, muscle, water, etc. The one number on a traditional scale won't show you the progress you're looking for.