prevent 0 division bug in percent calculation