Bug fix for reverse