Added a few more checks