Bug fix for when the current prefix is longer than the current word