Fixed a bug

This bug was caused by the toJson used to transfer object through chrome's messaging system.

We therefore have to send simpler data.