Bugfix for function step