fixed some crashes, added app lock

• fixed crashes when you delete an image you assigned to a behavior
• fixed behavior type not showing up right
• added lock functionality
• fixed some other bugs