Bugfix for attempted to call nil on ln 49