fixed db connections for workers. still not optimal to re-open connections for the worker threads..., a few frontend fixes