Fixing runtime-bug