Fixed the bug, had an error in variable names