correct thunk handling logic

fixes #7