Fix case where quadindex is equal to 1