Adopt to latest changes from Pete