fixed assert in applyQuantization