Fixed at least one issue, maybe caused a few more