Fixed an error due a wrong chunk of code being added to the staging area before committing