Bugs fixed

Fixed a bug where an unknown variable name caused php errors