Fixed macbook code