fixes renderSync logic