Fixes for build with QS