Fixed typo (wrong condition for defining the integration weights and nodes).