Added some more if-checks