Fixed issue with php warning at line 50