fixing lines = 0 bug