Removed some traces and fixed status code