changed the way that fields are obtained from model._meta because it seemed to have broken