Added fail-safe insert.