Fixed REST CRUD functions