minor updates of error checking codes