bugfix && clean code