fixed compilation error on GCC 4.7.2
added a fix to deal with oscillations in SAC-based model refinement