Fix some aserts in regexp