fixed NPE caused by: http://bugs.sun.com/view_bug.do?bug_id=6427854