Fixed issues. #6 #8 #10 #11 #12