fixing pthread error an x permissions