fix bugs on former