array splice fix