Fixed errors that caused test_check and test_check_with_nonexistent_alias to fail