fix adding up of statements