Correct Update/DowndateGram functions and tests