Modified to work for KDE