Some monkey patching and so on