fix the scoping when calling renderer