fix type error with postgres as backend
Merge pull request #8 from ilvalle/master

Fix type error when stop a task