fixes for macosx
some template