fixing reference system and fixing broken build