Merge "More fixes towards the race conditions in AMS" into qt-qpr1-dev