Fixes for swapImage