Fixed functional issues found during testing