some minor fixes - including get direct record which should return an object not an array