bugfix 'scrambled' images due to dimension swap