Patched a load of fixes