Some fixes to the vault hook