Fix static setOptions issue, added tests