fixed overwriting issue