fix calling optional methods of protocols