Fix code if no SecurityContext is set