Fixed bug in fit_env_bd: function definition was modified
Fixed plot_fit_env