Fix the exception that breaks the site if json empty