Fix several issues in swapchain tests