a proper fix to the bad_format checking misery