Fixed statistics

Update function had the wrong if argument.