cors and fixes