Fixed bug in supporting ruby units