fix for slow loading / unnecessary memory usage for multi-frame images