fixed possible bug with debugimage. slightly smarter probability