Fixed preview box script.