Changed fatal to warning, added check in rectfromlandmarks function