Removing a console log and fixing a DIV0 error