Fix '3 warnings and critical ' error