Issue #6 and Issue #9 fix - REST API