Added a few checks