Fixed a misplaced line of code