fixed for loop issue in local crypton.js, messages are sent but the messageHandler is still handed an undefined message