Fix NPE when passing adapter in load/dump options (fixes #123)