Fixed secondary error with serial closing for linux, forgot to check for negative ports, not just -1.