Fixed issues when writing Slideshows with -p.