Fix some bugs

The detection for Tuesday was incorrect causing the program to
occasionally crash.