Fix serve function to be able to handle concurency calls