even more bug fixes