Not multiplying elements correctly