Port to mirage 1.1.x