changed some js behavior