Fixed bug in the p_module as_json method