Nullreference bug gefixed