cleanup patch from Rick