Changes error checking