bug fixed with register lib