Avoid performance penalty in getContact

Also make sure the new register sheet is large enough.