Added isset() around  to inhibit warnings