Bugfix old code