Improve the library key validation a little more.