Ok, it looks like this whole if block should just be deleted.