Fixed bug in vault detection