Fix local variable assignment problem