Preview button + minor bug fixes