Adjust registerTask statement