Removing buggy code