Switch line numbers to start at 1. fix some confused logic.