Bug fix in emLen