Fixed bug in ravel