Some fixes on CommitsController and CommitsRepository