fixed CORS implementation
fixed CORS implementation
fixed invalid IDs