Fixed 2 issues found during testing and code review.