Fix resource-flickering