Fix JSON serialisation error after import