Fixed NullPointerException
Should fix crash in library.