small q9 fixes and tests