when post var wasn't already set this was throwing a PHP warning, this should work better