further fixes (ought to work now)