fixing bug #5649
removing deleted PKs from session object
fixing bug #5615 : fixing bad absolute URL