Restore application_controller.rb accidentally deleted
Fixed insert to system table