Fixed multiple array size bugs