Fixed hanging tests