After many painful hours I managed to restore the stock ROM by flashing the global fastboot ROM via Mi Flash. This also restored the stock recovery which I deleted, so my phone was in an original state. After this I did the same thing, except by following this guide and I did not flash twrp...