Critical fixes

Fixed #596, #597, #565, #735 and crash when opening daigram during interpretation (no bug in bugtracker)