Fixes sorting of tasks table