Fixed to work in netbeans