labels were not being properly assigned