fixes NPE problem
merged