please use `!empty()` in stead of isset (here, and on line 135, too.)