fixes from Kirk