Added debug assertion. Math assertions are now used in debug builds only.