removed pthread exit to ensure return