Proper handling of custom annotations