add rights scheme handling, minor fixes