Fix for duplicate bug