Fix javascript bug on truncate functions due to jshint integration.