Fixing bug - object with no properties