fixing claims middleware