Fixed logical errors on task page