Update code from nukeviet (12/08/2014)