Fixed couple issues caused plugin to error out