Fixed issue where going to an invalid site would cause an exception instead of 404

Per http://meta.stackoverflow.com/q/160625