fix the default value for getTask function getting the pending task