Even more bug fixes