Correct extraction of coefs

Corrected extraction of coefs for different model classes