fix image array count going over photo array count