Fixed bug in handle device and added device support to ruby client.