Fixed bug caused but unused code (old version).