fix. class Shell defined in anonymous function, but not exported