Added some checks