Fixed attempted to call nil bug on ln 30