Cleaning up when renderer is swapped