Bug fix in main branch