create_device.php fix, jsonprototype adjusted for testing purposes