bugfix(?) + optimizations