Small fixes
 * Fix minor memory leak in attribute dialog
 * Safety check in dual view