Fixed issues 1, 5, 6 & 7