cleans up some exception handling errors
further fixes exception handling