Fix duplicate definition errors