fixing more bugs with db saves and getting random event generation to work