Catch the proper exception and force the schem to upper case.

fix #514