ENG-7204 more stored proc fixes