[PATCH] RPZ: code updates and bug fixes #2