Fixed tests, added error handling for sxs