Fixed issues with codereview