Bug removed in threading