Fixes a number of bugs with ruk.