removed getting the current comment line from loop

+ fixed variable reference warning