Fixed bugs with labelling - now more accurate