Fixing REST API