bugfix on reg