Fixed few issues happend in windows 7 and XP