bug using records