Improve the check