patches from Alberto