Memory management: Fix remove preference if it's not supported