Fix buf in models and controllers