The if else clause is incorrect for mac. Therefore there was this error
reported on stackexchange. The rest is described in the annotations.