More bug fixes for compatibility with WAMP/MAMP