guarantee correctness in Plug.select