fix null patterns