What if you had more than one type of health insurance

I had insurance through Obamacare from Jan-July.. I then had a 2-3 month gap and was covered by with insurance by my new job. How do I avoid paying the penalty for having multiple months without coverage when I did have it again at the end of the year?