Fix boolean logic bug preventing messages from sending