Fixed crash due to attribute being null.