bugs in SMFB and ProfitMax solved

There were several bugs derived from the last changes that have been
corrected, now maybe the control files should be slightly adapted