fix broken bbox behavior + add some tests