Fix for prompt detection