Fixed changes from commenting

When I was commenting I saw a fix for a bug that occurs the program is
first run, and I started to implement the fix. Unfortunately I forgot
about it as I continued to comment the code and broke things. This
commit puts things right and implements a pseudo-fix.