Fixing automatic scheduled task