Some fixes for preview