ref-cursor fix