Fix bug where an expanded image would error and never contract or expand again.