Fixed null ref bug
1.0.1