fixed mac errors