fix sprite saving which was broken by prev commit