A workaround for the re-rendering problem