fixed failing of printing in case of non-none format