Fix for preview

Thanks to Netrix