minhnguyen - fix some bugs