Catch a few major errors

@Morphan1 never bothered testing his commits on a live server
apparently.