v5.4: fixed two small bugs