minor edit

Added error checking.