patches by Henk-Jan van Tuyl