bugfix recordsFromLayer