changes in aspect handling + pthread compatibility