fixed minor bug in a star algorithm