fixed ala_reasons() for jsonlite
fixed small error-checking bug