Added assertion for divide by zero