Fix issue that session stores functios to database
Merge pull request #1 from waltsu/function-fix

Fix issue that session stores functios to database