bugfix running commit twice when trying to commit