Fixed bug of not registering same line for first and last in config.