Bugfix related to array splice.