minor bug in ApplicationController, needed end