Some issues found by NetBeans