Avoid recompiling key
Add Python2 support