bugfix, typo & timing optimization