Fix app type detection bug because of absent NULL terminator