image detector, some bugfixes..