Removed duplicate line : gExpose(task, 'registerTask'); EOM