Due date

I’ve had my 1st scan today and the date due they’ve given me just doesn’t seem to match.

My last period was 1st November 2018 so based on that, the due date I was given was 8th August 2019. After the scan I was given 4th August. I only had unprotected sex on 18th November so this doesn’t match the dates does it??