add a Zeroing test and fix some bugs