fixes and broken proc def