Fixed preview post function