Bugfix: empty JSON {} leads to wrong behaviour