Added magicfields middleware