fixed chk_prefix(), finally