this fixes some bugs and corner cases, back in busines