fixes some weird assertion bug