Got rid of an unnecessary image copy