fixes and exceptions

many cases which have to be dealt with have been excluded (isNaN,
countries, forcing q=0)