Fix issues 9, 10, 11