Fixing delay in render