Fix two bugs caused strict warnings