Fix bug for build command when no image found