more complicated test + fixes