Fix NetworkOnMainThreadException

Not sure if it works, can't test it because IDE broke (again)