made updating users safe for null date fields also fixed some cursor logic