fix incorrect testing function name, remove erroneous defers