couple of changes to make works well on mac