Fix bugs on previous commit