fix sql syntax
fix issue for users without dropboxsession objects
use correct binstubs
make timezone independant