Fixes from pagd.