Added a better check