removed tabs, using ===, throwing err if it's not a connection lost error