Fixed patching issues