Fixes tests and pending