Fixed bug with SafeContains