Bugfix for editing tasks (still SQL errors!)