Fixed bug with null avid