patching primitive types