Patch the lost top() function.