Prevented log calc with 0