Fix cors and special handlers