Changed variable names to the right one