Made the code more robust in the library servlet
Merge pull request #424 from priand/playground

Made the code more robust in the library servlet