fixing bug where survey wasn't getting saved to database