Fixed failure on nil bug