Updated to work with sword-1.7