fixed format and potential exception