finalized the simple version of this fix that i could... tests to be written tomorrow