Updated tests. Error checking