Fixed NoteCardDb crashing. Added support for gesture detecting.