Fixed a bug in Application.run.