Avoid NPE + fix dep list (related to issue 7062)