fixed usage of annotation type cast exception