Improved annotation handling