Fixing bug with nested applications.