fixed array.splice and small pattern matcher fix