Fixed array bound issue