Fixed once-per-line functions

Immediately noticed bug!