fixes up image stuff a bit