Can't build while mining

I can’t build walls or designate a farming area while I have a mining order on the same level as the building.
When I removed the mining order I was able to build again.
Does anyone know why this is happening and have a fix for it?