Fixed bugs with NetBeans detection.