fix and expand tests