fix cycle bug in R&D schedule