fixes div zero vulnerablity