Fixed functionality for getting commits