better error handling so we can handle odd cases better