fixed bug in objectInCurrentThreadContext