Minor fix

Invalid place for commit call fixed