fixes bug when using several models in the same action