fixed bug in preview