Fixed preview text generation

The first line was ignored previously
Improved metadata formatting