fix # quoting, make cope higher if there are more than 30 lines