possbly fixed mac bug and possable linux bug