correct thunk handling logic

fixes #4