patch 18mode to run on 1.8.7