Fixed REST API bug.