a couple more bug fixes