fixed overlapping bug