Some minor UI bug fixes.
Fixed preview functionality.