fix no-prefix algorithm