applied helper patch kindly submitted by skaar <skaar@waste.org>