Make sure variable is set before using it

This was throwing an E_NOTICE. Per #145.