Bugfix where error callback always invoked and missing library