fixed duplicate bug