Null crash fix

Fix #5 crash