Fixed some variable names to reflect the new db