m_apache fixes by David Wicksell