Modified
  database hack thing for appfog (AGAIN)