fix stupid undefined index error