Fixed bug causing library to not work at all.