Fixed bug in ApplicationHandler