fix to REST API behaviour