Fixed copy/paste error which caused redeclaration of num variable