fixes from Ed