Fixed issues 1 to 3