Bug fix for dot complete function