Minor bug fixes and better traversal of slice.