Fix local variable 's' referenced before assignment