fixed bugs in isleadv from code rot