fix errors due to lack of use strict