fix for getLibrary storing library incorrectly