fixing format exception