[MERGE] merged the xrg branch containing some bugfixes