fixed problem with writing to inactive interface
added test for second line after port open