fix overwriting issue