Fixes bug creating and editing tasks