Fix test coverage/add tests for new logic