Hopefully I fixed the division by 0 error (Mart)