Fixes duplicate key error reporting