more bugfixes

to include in the newest version in npmjs