Fixed a bug in lens as well as making the blob detector more robust