Simple improvements to get rid of reflective call warning