Added deep equality checking