Improved code and some incorrect RIS fields