add better tolower to go with the toupper
fix task delete issue in scheduled task in sep threads
fix 64 bit upper/lower