Added modifications to avoid set fault