Fixed small issue with commit logic