Basic error checking added.