fixes from pi