Add additional tests

Adds tests for the bug fixes added in c3bac96448c12085fa749e636e91429cbc32fac5