bugfix + speed up