fix bug: only create rhino context on demand