Removed a rare error on registration as well as well as stopping an annoying undeclared variable