made the connection open/close messages generic fixes #65