Various testing fixes