Yeah, you're probably right that there was something wrong with my library as I had lots of other problems. However I thought that a corrupt library meant that it wouldn't be able to load at all, which wasn't the case.
Anyway, thanks for taking the time to look into this...