Fix build errors with error checking. Most unfortunate