Fixed JSON loading bug in common.php