First attempt at making this work again on the Mac