Sort policies by id. Fixes #145