Fixes a bug with adding things to a Java array