fix pull image and create container to use it if creation has failed