Fix bug when multiplying by 0