Bug fixes on the last commit