Added range check for line numbers (#100).