Fixes in error checking for projects 3 and 4.