Patch after setting default templatepath to null