Applied changed mede by https://github.com/movabletype/movabletype/commit/5574cecc9442a93be6adb8d3729fc96909a1db43