Bugfix: missing to copy some code