fixed deck printing index out of range error