fix head param to be compatible to OS X