Bugfix in append mode.