Fixed SegFault due to conflicting versions of code