Added some error handling to gracefully proceed past some weirdness