Issue 8, 9 and 17 fixed