fixed cast of warning & critical