fixed notice error due to lack of isset()