Other bug fixes