fixing nested list bug

Fix for #66.