 			socket.removeEventListener("message", socketCallback, false)
 			socket.removeEventListener("error", socketErrorCallback, false)
 		
-		socketCallback = (buffer) ->
+		socketCallback = (event) ->
+			buffer = event.data
 			handle = new Float32Array(buffer, 0, 1)[0]
-			if handle == workerHandle
-				callback(null, new Uint8Array(data, 4)) if callback
+			if handle == socketHandle
+				callback(null, new Uint8Array(buffer, 4)) if callback
 				socket.removeEventListener("message", socketCallback, false)
 				socket.removeEventListener("error", socketErrorCallback, false)
 

			
			_preloadRadius = @PRELOAD_RADIUS
			
			if @preloadTest(matrix, -_preloadRadius, -_preloadRadius, 2 * _preloadRadius) < @PRELOAD_TOLERANCE
				@pull(matrix, (err) ->
					done()
					callback() if !err and callback

		transmitPackage = new Float32Array(17)
		transmitPackage[0] = socketHandle
		transmitPackage.set(matrix, 1)
		socketHandle = transmitPackage[0]

		if socket.readyState == _WebSocket.OPEN
			socket.send(transmitPackage.buffer)
		else
			socketOpenCallback = ->
				socket.send(transmitPackage.buffer)
				socket.removeEventListener("open", socketOpenCallback, false)
			socket.addEventListener("open", socketOpenCallback, false)
		
