fixed load bug with jointcount + capfile refactoring