fix bugs due to underscore chain()