adjusted ESI filter to handle relative schemes