Fixed some edge issues.