Fix bug issues