Fix for issue #187

When last session variable is unset, delete `data` attribute instead of setting it to ''.
Merge pull request #191 from jamesfu/patch-3

Fix for issue #187