bugfix use delete instead of splice js function on array