fixed bug from undefined prop at line 305