fix prototype on thunk