Updated to latest libraries, attempt to fix NPE