Fixed bug in Controller class.
Let logger also take into account controller state.