Fixed bug in repeated multiplication