remove unnecessary memsets