Problem about the ScheduledThreadPoolExecutor fixed with a workaround. Further research needed for better solutions.