Fixed to notices due to not defined variables