Several bug fixes

SQLite should work on all machines.
Fixed modifier bugs.
Fixed out of range exceptions being thrown for some people.