Fixed multiple issues.