1.0.4.45: workaround for bug #412 & undefined variable cleanup