Added more checks for existing items