Fixes issue #211 (problem with exporting sprite sheets in some cases)