Remove Application. Fix bugs running on Mac OS X.