fixed db errors where db requests would only work locally but not when deployed