fix issue where divided by 0