Modify code for hawkejs improvements