fix factories and model specs