Fix crash bug.
Fix attached file locking up.