fix check and handle attr