Fixed bug when image doesn't finish building.