Fix/wrong check in initialization
a small but hard to find bug, check was done on variable which was passed to the function not the member variable.
a small but hard to find bug, check was done on variable which was passed to the function not the member variable.