fixed multiple reconnection issues
Merge pull request #22 from inaka/hernan.reconnection_fixes

fixed multiple reconnection issues