fixed some bugs with annotation preprocessing